package ntd.util.modular.things.entity;

import cn.hutool.json.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.v3.oas.annotations.media.Schema;
import ntd.util.config.common.entity.BaseEntityMybatis;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import ntd.util.util.metadata.NtdField;

/**
 * <p>
 * </p>
 *
 * @author liuwenju
 * @since 2022-05-24
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("things_product")
@Schema(description = "Product对象")
public class Product extends BaseEntityMybatis<Product> {

    @Schema(description = "产品名称")
    private String name;

    @Schema(description = "产品标签")
    private JSONArray tags;

    @Schema(description = "描述")
    @TableField("`desc`")
    private String desc;

    @Schema(description = "key")
    @TableField("`key`")
    private String key;

    @Schema(description = "secret")
    private String secret;

    @Schema(description = "因子列表")
    @NtdField(type = 61, oneModular = "things", twoModular = "factor")
    private String[] factors;

    @Schema(description = "服务列表")
    @NtdField(type = 61, oneModular = "things", twoModular = "service")
    private String[] services;

}
